package com.weilive.core.netty.client;

import com.weilive.core.protocol.json.JsonRequest;
import com.weilive.core.protocol.json.JsonResponse;

public class NettyLocalClient {
	
	public Object handleLocalJsonRequest(Object data) {
		try {
			JsonRequest request = new JsonRequest(data);
			JsonResponse response = request.handler.handleRequest(request);
			if (response != null && response.getError() == null) {
				return response.getData();
			}
		} catch (Exception e) {
		}
		return null;
	}

}
